package entityManager

import (
	"gitee.com/fierce_wolf/go-fox-edge-common/commEntityManager"
	"gitee.com/fierce_wolf/go-fox-edge-common/commRedisService"
	"gitee.com/fierce_wolf/go-fox-edge-common/edgeEntity"
)

func Instance() {
	consumer := commRedisService.IRedisManager.GetRedisConsumer()
	consumer[edgeEntity.Type.DeviceEntity.Type()] = nil
	consumer[edgeEntity.Type.OperateEntity.Type()] = nil
	consumer[edgeEntity.Type.ConfigEntity.Type()] = nil
	consumer[edgeEntity.Type.OperateMonitorTaskEntity.Type()] = nil

	reader := commRedisService.IRedisManager.GetRedisReader()
	reader[edgeEntity.Type.DeviceValueEntity.Type()] = nil
}

func InitLoadEntity() {
	commEntityManager.InitLoadEntity()
}

// Scheduler 线程函数
func Scheduler() {
	commEntityManager.Scheduler()
}
